package Before826.AutoJudge;
import java.io.*;
import java.util.List;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) throws  IOException {
        Scanner input = new Scanner(System.in);
        getAnswer A = new getAnswer();
        getStudent Stu = new getStudent();
        getScore Sco = new getScore();
       try{
           System.out.println("请输入要查询的文件夹:");
           String path = input.nextLine();//获取根目录

           List<String> TeacherAnswer = A.GetTeacherAnswer(new File(path));
           List<Student> StudentAnswer = Stu.GetStudent(new File(path));
           Sco.calculateAndPrintScores(TeacherAnswer,StudentAnswer);
           for (Student student: StudentAnswer){
               System.out.println(student.getScore());
           }

       }catch (Exception e){
           System.out.println("读取文件夹时发生错误");
           e.printStackTrace();
       }finally {
           input.close();
       }
    }

}
